package com.StructuralMode.bridge;

/**
 * @author Vhong
 * @version 1.0
 * Phone及其子类（样式）：
 */
public abstract class Phone {
    private Brand brand;
    public Phone(){

    }
    public Phone(Brand brand) {
        this.brand = brand;
    }
    protected void open(){
        this.brand.open();
    }
    protected void close(){
        this.brand.close();
    }
    protected void call(){
        this.brand.call();
    }
}
class FoldedPhone extends Phone {
    public FoldedPhone(Brand brand) {
        super(brand);
    }
    public void open(){
        super.open();
        System.out.println("折叠样式手机");
    }
    public void close(){
        super.close();
        System.out.println("折叠样式手机");
    }
    public void call(){
        super.call();
        System.out.println("折叠");
    }
}


